﻿#ifndef IMAGESOURCECAMERAOPERATE_H
#define IMAGESOURCECAMERAOPERATE_H

#include <QString>
#include "tisudshl.h"		// IC Imaging Control Class Library
#include <conio.h>

#include "opencv2/opencv.hpp"
#include <qdebug.h>

using namespace DShowLib;

class ImageSourceCameraOperate
{
public:
    ImageSourceCameraOperate();
    void Init( Grabber * m_cGrabber);
    void setDisplayParameter(HWND hwnd,int width,int height);//设置显示区域
    void display();
    void showDevicePage();//显示配置界面,一般用于第一次展示配置页面.
    void showPropertiesPage();//显示配置页面。可以设置图像参数的那种
    void saveDeviceStateToFile(QString fileName);//保存相机状态，包括各种图像的参数
    void loadDeviceStateFromFile(QString fileName);//从文件中回复相机状态
    void getSingleImg(tFrameQueueBufferPtr * pActiveBuf);
    bool getSingleImg2Mat(cv::Mat * mat);

private:
    tFrameQueueBufferPtr ImageSourceCameraOperate::getSingleFrame( Grabber& gr, const GUID& media_type );


private:
    Grabber		*m_cGrabber; // The instance of the Grabber class.
};

#endif // IMAGESOURCECAMERAOPERATE_H
